package com.dcd.mapper;

import com.dcd.pojo.Collection_video;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface Collection_videoMapper {

    /**
     * 根据登入用户id查询所有视频集合
     * @param user_id 登入用户id
     * @return
     */
    List<Collection_video> select_collection_videoList_byId(@Param("user_id") Integer user_id);

    /**
     * 添加收藏
     * @param collection_video 收藏表对象
     * @return
     */
    int add_collection_video(Collection_video collection_video);

    /**
     * 取消收藏
     * @param collection_video 收藏表对象
     * @return
     */
    int delete_collection_video(Collection_video collection_video);

    /**
     * 查询登录id 是否收藏了该视频   视频播放页
     * @param collection_video 收藏表对象
     * @return
     */
    int select_voider_broadcast(Collection_video collection_video);

}
